package com.andy.pojo;

import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Pattern;


/**
 * 将请求的url和方法及参数封装，等反射调用
 * **/
public class Handler {

    public Handler(Object object, Method method, Pattern url) {
        this.object = object;
        this.method = method;
        this.url = url;
        parameterMap = new HashMap<>();
    }


    @Override
    public String toString() {
        return "Handler{" +
                "object=" + object +
                ", method=" + method +
                ", url=" + url +
                ", parameterMap=" + parameterMap +
                '}';
    }

    private Object object;
    private Method method;
    private Pattern url;
    private Map<String,Integer> parameterMap;

    public Object getObject() {
        return object;
    }

    public void setObject(Object object) {
        this.object = object;
    }

    public Method getMethod() {
        return method;
    }

    public void setMethod(Method method) {
        this.method = method;
    }

    public Pattern getUrl() {
        return url;
    }

    public void setUrl(Pattern url) {
        this.url = url;
    }

    public Map<String, Integer> getParameterMap() {
        return parameterMap;
    }

    public void setParameterMap(Map<String, Integer> parameterMap) {
        this.parameterMap = parameterMap;
    }



}
